<% layout('/layouts/default.html', {title: '数据管理', libs:
['validate','fileupload','ueditor','dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header with-border">
			<div class="box-title">
				<i class="fa fa-list-alt"></i> ${text(ztTip.isNewRecord ? '折扣定价规则设置' :
				'折扣定价规则设置')}
			</div>
			<div class="box-tools pull-right">
				<button type="button" class="btn btn-box-tool"
					data-widget="collapse">
					<i class="fa fa-minus"></i>
				</button>
			</div>
		</div>
		
		<#form:form id="inputForm" model="${ztSk}"
		action="${ctx}/ztTip/saveSk" method="post" class="form-horizontal">
		<div class="box-body">
		<div class="form-unit">${text('定价规则设置信息(百分比%)')}</div>
			
			<div class="row">
				<div class="col-xs-10">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required">*</span> ${text('折扣毛利额切换的折扣(划线价折扣)')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-2">
							<#form:input path="switDiscount"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');" blankOption="true" class="form-control required"/>
							</div>
					</div>
				</div>
			</div>
			
			<div class="form-unit" style="margin-left: 50px;">普通用户</div>
			<div class="row">
				<div class="col-xs-4">
					<div class="form-group">
						<label class="control-label col-sm-8" title=""> <span
							class="required">*</span> ${text('普通用户价(划线价折扣)')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-4">
							<#form:input path="commonPriceDis"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');" blankOption="true" class="form-control required"/>
							</div>
					</div>
				</div>
				<div class="col-xs-8">
					<div class="form-group">
						<label class="control-label col-sm-8" title=""> <span
							class="required">*</span> ${text('一级佣金(普通/会员，用户结算价基准)')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-4">
							<#form:input path="commonOnePriceDis"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');" blankOption="true" class="form-control required"/>
							</div>
					</div>
				</div>
			</div>
			
			
			<div class="form-unit" style="margin-left: 50px;">会员用户(划线价折扣)</div>
			<div class="row">
				
				<div class="col-xs-4">
					<div class="form-group">
						<label class="control-label col-sm-9" title=""> <span
							class="required">*</span> ${text('(商品折扣4折内)会员用户折扣')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-3">
							<#form:input path="memOne"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');" blankOption="true" class="form-control required"/>
						</div>
						
					</div>
				</div>
				
				<div class="col-xs-4">
					<div class="form-group">
						<label class="control-label col-sm-9" title=""> <span
							class="required">*</span> ${text('(商品折扣4-5折)会员用户折扣')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-3">
							<#form:input path="memTwo"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');" blankOption="true" class="form-control required"/>
						</div>
						
					</div>
				</div>
				
				<div class="col-xs-4">
					<div class="form-group">
						<label class="control-label col-sm-9" title=""> <span
							class="required">*</span> ${text('(商品折扣5-6折)会员用户折扣')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-3">
							<#form:input path="memThree"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');" blankOption="true" class="form-control required"/>
						</div>
						
					</div>
				</div>
			</div>
			
			<div class="row">
				
				<div class="col-xs-4">
					<div class="form-group">
						<label class="control-label col-sm-9" title=""> <span
							class="required">*</span> ${text('(商品折扣6-7折)会员用户折扣')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-3">
							<#form:input path="memFour"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');" blankOption="true" class="form-control required"/>
						</div>
						
					</div>
				</div>
				
				<div class="col-xs-4">
					<div class="form-group">
						<label class="control-label col-sm-9" title=""> <span
							class="required">*</span> ${text('(商品折扣7-8折)会员用户折扣')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-3">
							<#form:input path="memFive"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');" blankOption="true" class="form-control required"/>
						</div>
						
					</div>
				</div>
				
				<div class="col-xs-4">
					<div class="form-group">
						<label class="control-label col-sm-9" title=""> <span
							class="required">*</span> ${text('(商品折扣8-9折)会员用户折扣')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-3">
							<#form:input path="memSix"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');" blankOption="true" class="form-control required"/>
						</div>
						
					</div>
				</div>
			</div>
			
		<!--
			<div class="form-unit" style="margin-left: 50px;">铜牌掌柜用户</div>
			<div class="row">
				<div class="col-xs-4">
					<div class="form-group">
						<label class="control-label col-sm-8" title=""> <span
							class="required">*</span> ${text('用户价(会员折扣基准减少)')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-4">
							
							<#form:input path="copperPriceDis"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');" blankOption="true" class="form-control required"/>
							</div>
					</div>
				</div>
				<div class="col-xs-4">
					<div class="form-group">
						<label class="control-label col-sm-8" title=""> <span
							class="required">*</span> ${text('一级佣金(用户结算价基准)')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-4">
							
							<#form:input path="copperOnePriceDis"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');" blankOption="true" class="form-control required"/>
							</div>
					</div>
				</div>
				<div class="col-xs-4">
					<div class="form-group">
						<label class="control-label col-sm-8" title=""> <span
							class="required">*</span> ${text('二级佣金(用户结算价基准)')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-4">
							
							<#form:input path="copperTwoPriceDis"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');" blankOption="true" class="form-control required"/>
							</div>
					</div>
				</div>
			</div>
			
			<div class="form-unit" style="margin-left: 50px;">银牌掌柜用户</div>
			<div class="row">
				<div class="col-xs-4">
					<div class="form-group">
						<label class="control-label col-sm-8" title=""> <span
							class="required">*</span> ${text('用户价(会员折扣基准减少)')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-4">
							
							<#form:input path="silverPriceDis"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');" blankOption="true" class="form-control required"/>
							</div>
					</div>
				</div>
				<div class="col-xs-4">
					<div class="form-group">
						<label class="control-label col-sm-8" title=""> <span
							class="required">*</span> ${text('一级佣金(用户结算价基准)')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-4">
							
							<#form:input path="silverOnePriceDis"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');" blankOption="true" class="form-control required"/>
							</div>
					</div>
				</div>
				<div class="col-xs-4">
					<div class="form-group">
						<label class="control-label col-sm-8" title=""> <span
							class="required">*</span> ${text('二级佣金(用户结算价基准)')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-4">
							
							<#form:input path="silverTwoPriceDis"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');" blankOption="true" class="form-control required"/>
							</div>
					</div>
				</div>
			</div>
			
			
			
			<div class="form-unit" style="margin-left: 50px;">金牌掌柜用户</div>
			<div class="row">
				<div class="col-xs-4">
					<div class="form-group">
						<label class="control-label col-sm-8" title=""> <span
							class="required">*</span> ${text('用户价(会员折扣基准减少)')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-4">
							
							<#form:input path="goldPriceDis"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');" blankOption="true" class="form-control required"/>
							</div>
					</div>
				</div>
				<div class="col-xs-4">
					<div class="form-group">
						<label class="control-label col-sm-8" title=""> <span
							class="required">*</span> ${text('一级佣金(用户结算价基准)')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-4">
							
							<#form:input path="goldOnePriceDis"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');" blankOption="true" class="form-control required"/>
							</div>
					</div>
				</div>
				<div class="col-xs-4">
					<div class="form-group">
						<label class="control-label col-sm-8" title=""> <span
							class="required">*</span> ${text('二级佣金(用户结算价基准)')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-4">
						
							<#form:input path="goldTwoPriceDis"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');" blankOption="true" class="form-control required"/>
							</div>
					</div>
				</div>
			</div>

		</div>
-->
		<div class="box-footer">
			<div class="row">
				<div class="col-sm-offset-2 col-sm-10">
					<% if (hasPermi('sk:skData:edit')){ %>
					<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit">
						<i class="fa fa-check"></i> ${text('保 存')}
					</button>
					&nbsp; <% } %>
					<button type="button" class="btn btn-sm btn-default" id="btnCancel"
						onclick="js.closeCurrentTabPage()">
						<i class="fa fa-reply-all"></i> ${text('关 闭')}
					</button>
				</div>
			</div>
		</div>
		</#form:form>
	</div>
</div>
<% } %>
<script>
	$("#inputForm").validate({
		submitHandler : function(form) {
			js.ajaxSubmitForm($(form), function(data) {
				js.showMessage(data.message);
				if (data.result == Global.TRUE) {
					js.closeCurrentTabPage(function(contentWindow) {
						contentWindow.page();
					});
				}
			}, "json");
		}
	});
</script>